const express = require('express');
const router = express.Router();
const Article = require('../models/Article');

router.post('/searchArticle', (req, res) => {
    Article.findAll().then(sqlRes => {
        res.json({ code: 1, status: 'S', data: sqlRes, msg: '成功' })
    }).catch(sqlError => {
        res.json({ code: 0, status: 'E', data: sqlError, msg: sqlError })
    })
})

module.exports = router;